function CannonPiece()
{
    this.m_boardPos = new Point(0, 0);
    this.m_drawPos = new Point(0, 0);
    this.m_isActive = true;
    this.m_isSelected = false;
    this.m_isRedSide = false;
    this.m_selectedImage = new Image();
    this.m_imageChessPiece = new Image;
}

CannonPiece.prototype = new ChessPiece();

CannonPiece.prototype.CanMoveTo = function(currPos, newPos)
{
    return BasicRule.CanCannonMoveTo(currPos, newPos);
}

CannonPiece.prototype.GetPotentialNextPositions = function (posList, pos) {
    posList = [];

    // ... Horizontally.
    for (var y = 0; y < BoardInfo.col() ; ++y) {
        if (y == pos.GetY()) continue;
        posList.push(new Point(y, pos.GetX()));

    }

    // ... Vertically
    for (var x = 0; x < BoardInfo.row() ; ++x) {
        if (x == pos.GetX()) continue;
        posList.push(new Point(pos.GetY(), x));

    }

    return posList;
}